<include file="Admin@Public/header" /> 
<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
  <input type="hidden" id="web-url" value="__URL__"/>
    <ol class="breadcrumb">
      <li>内容管理</li>
      <li>文章管理</li>
      <li class="active">列表</li>
      <li class="pull-right"><a href="__URL__/lists?status=-1"><i class="icon-trash"></i> 回收站 （{$trashCount}）</a></li>
      <li class="pull-right"><a  href="__URL__/add"><i class="icon-plus"></i> 添加</a></li>
    </ol>

  <div class="alert alert-info" role="alert">
      <form  class="form-horizontal" role="form" action="__URL__/index">
        <div class="form-group">
          <label for="keywords" class="col-sm-1 control-label">查找</label>
          <div class="col-sm-3">
            <input type="text" class="form-control" name="keywords" placeholder="请输入关键字" value="{$Think.get.keywords}">
          </div>
          <div class="col-sm-3">
          <?php
            $allTypes = R('Content/Type/tree'); 
          ?>
          <select name="type" class="form-control" id="type">
            <option value="">选择所属分类</option>
            <volist name="allTypes" id="type">
              <option value="{$type.id}" <if condition="$Think.get.type  == $type['id']">selected="selected"</if> >{$type.html}{$type.name}</option>
            </volist>  
          </select>
        </div>
          <div class="col-sm-1">
            <button type="submit" class="btn btn-default">搜索</button>
          </div>  
        </div>
      </form>
  </div>


  <div class="table-responsive">
    <form  class="form-horizontal" id="form-listorder" role="form">
         <table class="table">
              <thead>
                <tr>
                  <th class="col-md-1">#</th>
                  <th class="col-md-1">ID</th>
                  <th class="col-md-2">标题</th>
                  <th class="col-md-2">URL</th>
                  <th class="col-md-2">分类</th>
                  <th class="col-md-1">状态</th>
                  <th class="col-md-1">置顶</th>
                  <th class="col-md-2">操作</th>
                </tr>
              </thead>
            <tbody>
        <volist name="list" id="vo">
              <tr>
                <td><input type="checkbox" name="checkbox_id" value="{$vo.id}"></td>
                <td>{$vo.id}</td>
                <td><notempty name="vo.url"><a href="/article/{$vo.url}.html" target="_blank"><else/><a href="/article/{$vo.id}.html" target="_blank"></notempty>{$vo.title}</a></td>
                <td><notempty name="vo.url">/{$vo.url}<else/>/{$vo.id}</notempty>.html</td>
                <td>{$vo.type.name}</td>
                <td>
                   <switch name="vo.status"> 
                    <case value="0"><i class="icon-lock"></i> 隐藏</case>
                    <case value="1"><i class="icon-unlock"></i> 显示</case>
                    <case value="-1"><i class="icon-trash"></i> 删除</case>
                  </switch>
                </td>
                <td><notempty name="vo.top">是<else/>否</notempty></td>
                <td>
                <notempty name="vo.url"><a href="/article/{$vo.url}.html" target="_blank" class="btn btn-default btn-xs"><else/><a href="/article/{$vo.id}.html" target="_blank" class="btn btn-default btn-xs"></notempty> <i class="icon-eye-open"></i></a> 
                <a class="btn btn-default btn-xs" title="编辑" href="__URL__/edit?id={$vo.id}"><i class="icon-edit"></i></a>
    <if condition="$vo.status eq -1">
      <a class="btn btn-info btn-xs" title="彻底删除" href="javascript:checkDialog('__URL__/changeStatus?id={$vo.id}&status=1','确定选择恢复？')"><i class="icon-refresh"></i></a>
      <a class="btn btn-danger btn-xs" title="彻底删除" href="javascript:checkDialog('__URL__/delete?id={$vo.id}','确定选择彻底删除？')"><i class="icon-trash"></i></a>
    <elseif condition="$vo.status eq 0"/>
      <a class="btn btn-success btn-xs" title="设置为显示" href="javascript:checkDialog('__URL__/changeStatus?id={$vo.id}&status=1','确定设置为显示？')"><i class="icon-unlock"></i></a>
      <a class="btn btn-danger btn-xs" title="删除" href="javascript:checkDialog('__URL__/changeStatus?id={$vo.id}&status=-1','确定选择删除？')"><i class="icon-trash"></i></a>
    <else/>  
      <a class="btn btn-warning btn-xs" title="设置为隐藏" href="javascript:checkDialog('__URL__/changeStatus?id={$vo.id}&status=0','确定设置为隐藏？')"><i class="icon-lock"></i></a>
      <a class="btn btn-default btn-xs" title="取消置顶" href="javascript:checkDialog('__URL__/changeTop?id={$vo.id}&top=0','确定取消置顶？')"><i class="icon-circle-arrow-down"></i></a>
      <a class="btn btn-info btn-xs" title="设置置顶" href="javascript:checkDialog('__URL__/changeTop?id={$vo.id}&top=1','确定设置置顶？')"><i class="icon-circle-arrow-up"></i></a>
      <a class="btn btn-danger btn-xs" title="删除" href="javascript:checkDialog('__URL__/changeStatus?id={$vo.id}&status=-1','确定选择删除？')"><i class="icon-trash"></i></a>
    </if>
                </td>
              </tr>
        </volist> 
            </tbody>
            <tfoot>
              <tr class="info">
               <include file="opreat"/>
              </tr>
            </tfoot> 
          </table>
        </form>  
      </div>
      
       
          
        
     
</div>
<include file="Admin@Public/script_list" />
<include file="Admin@Public/footer" />   

